<template>

  <!-- 轮播图 -->
  <div class="home-banner-box">
    <van-swipe class="my-swipe" :autoplay="3000" indicator-color="white">
      <van-swipe-item v-for="item in bannerList" :key="item.id">
        <van-image
          class="banner_img"
          :src="item.img"
          fit="contain"
        />
      </van-swipe-item>
    </van-swipe>
  </div>

</template>

<script>
export default {
  name: "banner",
  data() {
    return {
      bannerList: []
    }
  },

  methods: {},

  created() {
    this.bannerList = [
      {id: 1, img: 'http://daleblog.top/%E7%96%AB%E6%83%85/banner1.jpeg'},
      {id: 2, img: 'http://daleblog.top/%E6%8A%97%E7%96%AB%20%282%29.jpg'},
      {id: 3, img: 'http://daleblog.top/%E6%8A%97%E7%96%AB%E7%94%B5%E5%BD%B1.jpeg'},
    ]

    // console.log(this.bannerList)
  }
}
</script>

<style scoped>
.my-swipe .van-swipe-item {
  color: #fff;
  text-align: center;
  height: 200px;
}




</style>
